package com.motorwaymanage.actions;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.motorwaymanage.beans.ApplyInfo;
import com.motorwaymanage.beans.MaintainerInfo;
import com.motorwaymanage.biz.IApplyInfoBiz;
import com.motorwaymanage.impl.ApplyInfoBizImpl;
import com.opensymphony.xwork2.ActionSupport;

public class ApplyInfoAction extends ActionSupport{

	private static final long serialVersionUID = 1L;
	
	private List<ApplyInfo> list;
	private IApplyInfoBiz applyInfoBiz=new ApplyInfoBizImpl();
	private HttpSession session;
	
	{
		session=ServletActionContext.getRequest().getSession();
	}
	
	public String OneApplyInfo(){
		IApplyInfoBiz applyInfoBiz=new ApplyInfoBizImpl();
		MaintainerInfo mi=(MaintainerInfo) session.getAttribute("staffInfo");
		list=applyInfoBiz.selectApplyInfo(mi.getMid());
		if(list.size()>0){
			return SUCCESS;
		}else{
			return null;
		}
	}
	
	public List<ApplyInfo> getList() {
		return list;
	}
}
